/* 专辑详情页面样式 */
.album-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  padding: 20px;
}

/* 加载状态 */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  color: #ccc;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top: 3px solid #4ecdc4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  text-align: center;
  color: #ccc;
}

.error-container h3 {
  margin: 0;
  color: #ff6b6b;
  font-size: 1.2em;
}

.error-container p {
  margin: 0;
  color: #aaa;
  max-width: 300px;
  line-height: 1.5;
}

.album-detail .album-detail-header {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: center;
}

.album-detail .ad-header-buttons {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.album-detail .ad-left-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.album-detail .ad-right-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.album-detail .ad-sidebar-btn {
  background: transparent;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 8px;
  font-size: 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.album-detail .ad-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.album-detail .ad-back {
  background: transparent;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.album-detail .ad-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.album-detail .ad-cover-wrap {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.album-detail .ad-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-detail .ad-cover.placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(255, 255, 255, 0.8);
}

.album-detail .ad-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.album-detail .ad-title {
  margin: 0;
  font-size: 2em;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.album-detail .ad-sub {
  color: #ccc;
  font-size: 1.1em;
  line-height: 1.4;
}

.album-detail .ad-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.album-detail .ad-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.album-detail .ad-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.album-detail .ad-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.album-detail .ad-btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.album-detail .ad-btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.album-detail .ad-btn.edit-btn {
  background: rgba(255,255,255,0.1); 
  border: 1px solid rgba(255,255,255,0.2); 
  color: #fff; 
  padding: 8px 12px; 
  border-radius: 6px; 
  cursor: pointer; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 14px;
}

.album-detail .ad-btn.edit-btn:hover:not(:disabled) {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}

/* 音乐列表样式 */
.album-detail .album-detail-tracks {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  flex: 1;
}

.album-detail .album-detail-tracks .ad-tracks-body {
  overflow-y: scroll;
  height: 100%;
  padding-right: 10px;
}

.album-detail .ad-tracks-header, .album-detail .tr {
  display: grid;
  grid-template-columns: 60px 1.5fr 1fr 100px 160px;
  gap: 12px;
  padding: 12px 16px;
}

.album-detail .ad-tracks-header {
  background: rgba(255,255,255,0.08);
  color: #ccc;
  font-weight: 600;
  padding-right: 30px;
}

.album-detail .tr {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.album-detail .tr.empty {
  text-align: center;
  grid-column: 1 / -1;
  color: #888;
  padding: 40px 16px;
  font-style: italic;
}

.album-detail .td, .album-detail .th {
  display: flex;
  align-items: center;
  overflow: hidden;
  font-size: 13px;
}

.album-detail .th-title, .album-detail .td-title {
  overflow: hidden;
}

.album-detail .td, .album-detail .center {
  flex-grow: 1;
  text-align: center;
}

.album-detail .title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.album-detail .td-cover {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.album-detail .title-text {
  min-width: 0;
  color: #fff;
  font-size: 0.95em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-detail .artist-link {
  color: #ccc;
  cursor: pointer;
  transition: color 0.2s ease;
}

.album-detail .artist-link.clickable:hover {
  color: #667eea;
  text-decoration: underline;
}

/* 操作按钮样式 */
.album-detail .td-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.action-buttons {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: center;
}

.action-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 28px;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.action-btn.play-btn:hover {
  background: #4ecdc4;
}

.action-btn.add-btn:hover {
  background: #ff6b6b;
}

.action-btn.favorite-btn:hover {
  background: #ffd700;
  color: #333;
}

.action-btn.favorite-btn.favorited {
  background: #ffd700;
  color: #333;
}

.action-btn.details-btn:hover {
  background: #9b59b6;
}

/* 编辑模态框样式 */
.edit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.edit-modal {
  background: #2c3e50;
  border-radius: 12px;
  padding: 0;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-modal-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1.3em;
  font-weight: 600;
}

.edit-modal-close {
  background: transparent;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 8px;
  font-size: 18px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.edit-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.edit-modal-form {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* 封面区域样式 */
.cover-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cover-upload-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.cover-preview-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.cover-preview-wrap:hover {
  transform: scale(1.02);
}

.preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  opacity: 0.7;
}

.placeholder-icon {
  font-size: 48px;
  margin-bottom: 8px;
  opacity: 0.8;
}

.placeholder-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.cover-input {
  display: none;
}

.cover-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  margin-bottom: 0 !important;
}

.cover-label:hover {
  background: rgba(0, 0, 0, 0.9);
}

.cover-label.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.6);
}

.cover-label.disabled:hover {
  background: rgba(0, 0, 0, 0.6);
}

.upload-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.edit-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.edit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.edit-btn.cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.edit-btn.cancel:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.edit-btn.submit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.edit-btn.submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.edit-btn.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loading-spinner {
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-top: 1.5px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 响应式设计 */
@media (max-width: 900px) {
  .album-detail .ad-tracks-header, .album-detail .tr {
    grid-template-columns: 40px 1fr 100px 120px;
  }
  .album-detail .th-artist, .album-detail .td-artist {
    display: none;
  }
  
  .action-buttons {
    gap: 3px;
  }
  
  .action-btn {
    width: 26px;
    height: 26px;
    font-size: 0.8em;
  }
}

@media (max-width: 600px) {
  .album-detail .ad-tracks-header, .album-detail .tr {
    grid-template-columns: 40px 1fr 120px;
  }
  .album-detail .th-duration, .album-detail .td-duration {
    display: none;
  }
  
  .action-buttons {
    gap: 2px;
  }
  
  .action-btn {
    width: 24px;
    height: 24px;
    font-size: 0.75em;
  }
}

@media (max-width: 768px) {
  .album-detail .album-detail-header {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }

  .album-detail .ad-header-buttons {
    flex-direction: row;
    gap: 12px;
    align-items: stretch;
  }

  .album-detail .ad-left-buttons {
    justify-content: center;
  }

  .album-detail .ad-right-buttons {
    justify-content: center;
  }

  .album-detail .ad-cover-wrap {
    width: 120px;
    height: 120px;
    margin: 0 auto;
  }

  .album-detail .ad-title {
    font-size: 1.6em;
  }

  .album-detail .ad-actions {
    justify-content: center;
  }

  .edit-modal {
    width: 95%;
    margin: 20px;
  }

  .edit-modal-actions {
    flex-direction: row;
  }

  .edit-btn {
    width: 100%;
  }

  .cover-preview-wrap {
    width: 100px;
    height: 100px;
  }

  .preview-image,
  .preview-placeholder {
    width: 100%;
    height: 100%;
  }

  .placeholder-icon {
    font-size: 36px;
  }

  .placeholder-text {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .album-detail {
    padding: 16px;
  }

  .album-detail .ad-title {
    font-size: 1.4em;
  }

  .album-detail .ad-actions {
    gap: 8px;
  }

  .album-detail .ad-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}


